set( LINUX_SOURCES
    ../ActivateContainerRequest.cpp
    ../ActivateContainerReply.cpp
    ../DeactivateContainerRequest.cpp
    ../ContainerOperationReply.cpp
    ../ComHostingSettingsResult.cpp
    ../RegisterContainerActivatorServiceRequest.cpp
    ../RegisterContainerActivatorServiceReply.cpp
    ../ContainerActivatorServiceAgent.cpp
    ../ContainerActivatorServiceConfig.cpp
    ../InvokeContainerApiRequest.cpp
    ../InvokeContainerApiReply.cpp
    ../ActivateCodePackageReply.cpp
    ../ActivateCodePackageRequest.cpp
    ../ActivateHostedServiceRequest.cpp
    ../ActivateProcessReply.cpp
    ../ActivateProcessRequest.cpp
    ../Activator.cpp
    ../ActivatorRequestor.cpp
    ../Application.cpp
    ../ApplicationEnvironmentContext.cpp
    ../ApplicationHostActivationTable.cpp
    ../ApplicationHostContainer.cpp
    ../ApplicationHostContext.cpp
    ../ApplicationHost.cpp
    ../ApplicationHostIsolationContext.cpp
    ../ApplicationHostManager.cpp
    ../GuestServiceTypeHostManager.cpp
    ../ApplicationHostProxy.cpp
    ../ApplicationHostRegistration.cpp
    ../ApplicationHostRegistrationStatus.cpp
    ../ApplicationHostRegistrationTable.cpp
    ../ApplicationHostType.cpp
    ../ApplicationManager.cpp
    ../ApplicationMap.cpp
    ../ApplicationPrincipals.cpp
    ../ApplicationService.cpp
    ../ApplicationServiceMap.cpp
    ../AssignIpAddressesReply.cpp 
    ../AssignIpAddressesRequest.cpp
    ../AzureVnetPluginProcessManager.cpp
    ../BuiltinServiceAccount.cpp
    ../CertificateAccessDescription.cpp
    ../CertificateAclingManager.cpp
    ../CleanupApplicationPrincipalsReply.cpp
    ../CleanupSecurityPrincipalRequest.cpp
    ../CodePackageActivationContext.cpp
    ../CodePackageActivationId.cpp
    ../CodePackageContext.cpp
    ../CodePackage.cpp
    ../CodePackageInstance.cpp
    ../CodePackageRuntimeInformation.cpp
    ../CodePackageTerminationNotificationRequest.cpp
    ../ComCodePackageActivationContext.cpp
    ../ComCodePackage.cpp
    ../ComConfigPackage.cpp
    ../ComDataPackage.cpp
    ../ComFabricNodeContextResult.cpp
    ../ComFabricRuntime.cpp
    ../ComProxyCodePackageHost.cpp
    ../ComProxyStatefulServiceFactory.cpp
    ../ComProxyStatelessServiceFactory.cpp
    ../ConfigureCertificateACLsRequest.cpp
    ../ConfigureCrashDumpReply.cpp
    ../ConfigureCrashDumpRequest.cpp
    ../ConfigureEndpointBindingAndFirewallPolicyRequest.cpp
    ../ConfigureContainerCertificateExportRequest.cpp
    ../CleanupContainerCertificateExportRequest.cpp
    ../ConfigureContainerCertificateExportReply.cpp
    ../ConfigureEndpointSecurityRequest.cpp
    ../ConfigureNodeForDnsService.cpp
    ../ConfigureNodeForDnsServiceRequest.cpp
    ../ConfigureSecurityPrincipalReply.cpp
    ../ConfigureSecurityPrincipalRequest.cpp
    ../ConfigureSharedFolderACLRequest.cpp
    ../ConfigureSMBShareRequest.cpp
    ../Constants.cpp
    ../ContainerActivatorLinux.cpp
    ../ContainerApiResult.cpp
    ../ContainerImageDownloaderLinux.cpp
    ../ContainerEventConfig.cpp
    ../ContainerConfig.cpp
    ../ContainerConfigHelper.cpp
    ../ContainerHelper.cpp
    ../ContainerHostConfig.cpp
    ../ContainerStats.cpp
    ../CrashDumpConfigurationManager.cpp
    ../CrashDumpProvider.cpp
    ../CreateSymbolicLinkRequest.cpp
    ../DeactivateCodePackageReply.cpp
    ../DeactivateCodePackageRequest.cpp
    ../DeactivateHostedServiceRequest.cpp
    ../DeactivateProcessReply.cpp
    ../DeactivateProcessRequest.cpp
    ../Deactivator.cpp
    ../DeleteFolderRequest.cpp
    ../DeleteApplicationFoldersReply.cpp
    ../DeleteContainerImagesRequest.cpp
    ../DeletionManager.cpp
    ../DisableNodeRequest.cpp
    ../DomainUser.cpp
    ../DockerClient.cpp
    ../DockerProcessManager.cpp
    ../DockerUtilities.cpp
    ../DownloadContainerImagesRequest.cpp
    ../DownloadManager.cpp
    ../DnsServiceEnvironmentManager.cpp
    ../EnableNodeRequest.cpp
    ../EndpointCertificateBinding.cpp
    ../EndpointProvider.cpp
    ../EndpointResource.cpp
    ../EnvironmentManager.cpp
    ../EnvironmentResource.cpp
    ../EventDispatcher.cpp
    ../FabricActivationManager.cpp
    ../FabricActivatorClient.cpp
    ../FabricHostConfig.cpp
    ../FabricHostOperationReply.cpp
    ../FabricNodeContext.cpp
    ../FabricNodeContextResult.cpp
    ../FabricRestartManager.cpp
    ../FabricRuntimeContext.cpp
    ../FabricRuntimeImpl.cpp
    ../FabricRuntimeManager.cpp
    ../FabricUpgradeImpl.cpp
    ../FabricUpgradeManager.cpp
    ../FabricUpgradeRequest.cpp
    ../FinishRegisterApplicationHostReply.cpp
    ../FinishRegisterApplicationHostRequest.cpp
    ../FirewallSecurityProvider.cpp
    ../GetFabricProcessSidReply.cpp
    ../HostedServiceActivationManager.cpp
    ../HostedService.cpp
    ../HostedServiceInstance.cpp
    ../HostedServiceMap.cpp
    ../HostedServiceParameters.cpp
    ../HostingConfig.cpp
    ../HostingHealthManager.cpp
    ../HostingQueryManager.cpp
    ../HostingSubsystem.cpp
    ../HostingTraces.cpp
    ../HttpEndpointSecurityProvider.cpp
    ../InvalidLeaseReplyBody.cpp
    ../IPAddressProvider.cpp
    ../IPHelper.cpp
    ../IPAM.cpp
    ../IPAMLinux.cpp
    ../FlatIPConfiguration.cpp
    ../ReservationManager.cpp
    ../LeaseMonitor.cpp
    ../LocalUser.cpp
    ../LogCollectionProviderFactory.cpp
    ../MultiCodePackageApplicationHost.cpp
    ../MultiCodePackageApplicationHostProxy.cpp
    ../NetworkContextType.cpp
    ../NodeDisabledNotification.cpp
    ../NodeEnabledNotification.cpp
    ../NodeEnvironmentManager.cpp
    ../NodeHostClosedEventArgs.cpp
    ../NodeRestartManagerClient.cpp
    ../NonActivatedApplicationHost.cpp
    ../OperationStatus.cpp
    ../OperationStatusMap.cpp
    ../PendingOperationMap.cpp
    ../PortAclMap.cpp
    ../PortAclRef.cpp
    ../portcertref.cpp
    ../PrincipalsProviderContext.cpp
    ../PrincipalsProvider.cpp
    ../ProcessActivationContext.Linux.cpp
    ../ProcessActivationManager.cpp
    ../ProcessActivator.Linux.cpp
    ../ProcessConsoleRedirector.Linux.cpp
    ../RegisterFabricActivatorClientReply.cpp
    ../RegisterFabricActivatorClientRequest.cpp
    ../RegisterFabricRuntimeReply.cpp
    ../RegisterFabricRuntimeRequest.cpp
    ../RegisterServiceTypeReply.cpp
    ../RegisterServiceTypeRequest.cpp
    ../RepositoryAuthConfig.cpp
    ../RunAsConfig.cpp
    ../RuntimeRegistration.cpp
    ../RuntimeRegistrationTable.cpp
    ../RuntimeSharingHelper.cpp
    ../SecurityGroup.cpp
    ../SecurityIdentityMap.cpp
    ../SecurityPrincipalHelper.cpp
    ../SecurityPrincipalInformation.cpp
    ../SecurityPrincipalsProvider.cpp
    ../SecurityUser.cpp
    ../ServiceAccount.cpp
    ../ServiceFactoryManager.cpp
    ../ServiceFactoryRegistration.cpp
    ../ServiceFactoryRegistrationTable.cpp
    ../ServicePackageContext.cpp
    ../ServicePackage.cpp
    ../ServicePackageEnvironmentContext.cpp
    ../ServicePackageMap.cpp
    ../ServicePackageOperation.cpp
    ../ServicePackageInstanceOperation.cpp
    ../ContainerHealthCheckStatusChangeNotification.cpp
    ../ServiceTerminatedNotification.cpp
    ../ServiceTypeState.cpp
    ../ServiceTypeStateManager.cpp
    ../ServiceTypeStatus.cpp
    ../SetupConfig.cpp
    ../SetupContainerGroupRequest.cpp  
    ../ComGuestServiceInstance.cpp
    ../ComGuestServiceTypeFactory.cpp
    ../GuestServiceTypeHost.cpp
    ../SingleCodePackageApplicationHost.cpp
    ../InProcessApplicationHost.cpp
    ../SingleCodePackageApplicationHostProxy.cpp
    ../InProcessApplicationHostProxy.cpp
    ../StartRegisterApplicationHostReply.cpp
    ../StartRegisterApplicationHostRequest.cpp
    ../stdafx.cpp
    ../TraceSessionManager.cpp
    ../TokenSecurityAccount.cpp
    ../UnregisterApplicationHostReply.cpp
    ../UnregisterApplicationHostRequest.cpp
    ../UnregisterFabricRuntimeReply.cpp
    ../UnregisterFabricRuntimeRequest.cpp
    ../UpdateCodePackageContextReply.cpp
    ../UpdateCodePackageContextRequest.cpp
    ../VersionedApplication.cpp
    ../VersionedServicePackage.cpp
    ../LocalResourceManager.cpp
    ../ContainerInfoReply.cpp
    ../GetContainerInfoReply.cpp
    ../GetContainerInfoRequest.cpp
    )

include_directories("..")

set(Casablanca_LIBRARY ${LIB}cpprest)
set(Casablanca_LIBRARIES ${Casablanca_LIBRARY} ${Boost_LIBRARIES} ${Boost_FRAMEWORK})



add_library(objects_Hosting2 OBJECT ${LINUX_SOURCES})

add_precompiled_header(objects_Hosting2 ../stdafx.h)

add_library(${lib_Hosting2} STATIC $<TARGET_OBJECTS:objects_Hosting2>)

target_link_libraries( ${lib_Hosting2}
    ${Casablanca_LIBRARIES} ssl crypto cgroup ${lib_ResourceMonitorConfig}
    )

set_target_properties(${lib_Hosting2} PROPERTIES 
    ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIR}) 

